#! /bin/sh -e

cd fsharp

ROOT=fsharp

# files we can redistribute, according to the license
BIN_FILES="FSharp.Core.dll FSharp.Core.xml FSharp.Core.sigdata FSharp.Core.optdata FSharp.Compiler.Server.Shared.dll FSharp.Compiler.Interactive.Settings.dll FSharp.Compiler.dll fsc.exe fsi.exe"

# make another fsharp directory with only what's needed
mkdir $ROOT
mkdir $ROOT/bin
cd bin && cp $BIN_FILES ../$ROOT/bin/ && cd ..
cp fsi_extra.fsx $ROOT/bin/
cp -r ../samples $ROOT/
cp fsharpc.1 fsharpi.1 $ROOT/
cp install.sh uninstall.sh $ROOT/
mkdir $ROOT/script/
cp script/local/* $ROOT/script/
